﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MyTestWeb
{
	public partial class radomText : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

        protected void Button1_Click(object sender, EventArgs e)
        {
			LabelNumList.Text = "";
			int i = 1,j,Num;
			string str = "";
			Random random = new Random();
			while (i <= 8) {
				str = str + "第" + i.ToString() + "组: ";
				for (j = 1; j <= 5; j++) {
					Num = random.Next(1, 9);
					if (Num == 6) {
						str = str + Num.ToString() + "&nbsp;";
						break;
					}
                    str = str + Num.ToString() + "&nbsp;";
                }
				str = str + "<br />";
				i++;
			}
			LabelNumList.Text = str;
        }
    }
}